feat: Implement upsert functionality in overlay actions#4
feat: Implement upsert functionality in overlay actions#4emilien-puget wants to merge 1 commit intopb33f:mainfrom
upsert functionality in overlay actions#4Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4 +/- ##
=======================================
Coverage ? 69.11%
=======================================
Files ? 17
Lines ? 2911
Branches ? 0
=======================================
Hits ? 2012
Misses ? 705
Partials ? 194
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@daveshanley wdyt ? |
| return newNode | ||
| } | ||
|
|
||
| func createPath(root *yaml.Node, p *jsonpath.JSONPath, value *yaml.Node) error { |
There was a problem hiding this comment.
createPath is used when a target is absent, but both ensureArrayIndex and setArrayValue reject index >= len(...). So documented cases like $.items[0] on a missing array, or $.a.b[2].c, will fail instead of being materialized. It also means a failed upsert can leave partially-created parent nodes behind before returning the error.
(Codex found this)
Like it! just one comment, thanks to the robots, but a really nice upgrade. |
upsert functionality in overlay actionsupsert functionality in overlay actions
Adds upsert action to overlays to create missing paths, refuses wildcard path
it seems the project was not go fmt, sorry for the changes on everyline